package com.prs.crm.dao.crm.impl;


import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Property;

import com.prs.crm.dao.crm.FaultDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.crm.CustomerProject;
import com.prs.crm.domain.crm.Equipment;
import com.prs.crm.domain.crm.Fault;

public class FaultDaoImpl extends BaseDaoImpl<Fault> implements FaultDao{

	@Override
	public List<Fault> getFaultByCustomerProject(CustomerProject customerProject) {
		Criteria criteria = this.getSession().createCriteria(Fault.class);
		criteria.add(Property.forName("customerProject").eq(customerProject));
		return criteria.list();
	}

}
